package com.gdut.Demo4;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Student> stdList = new ArrayList<>();
        Student std1 = new Student("张三", 23, "男");
        Student std2 = new Student("李四", 24, "女");
        Student std3 = new Student("王五", 25, "男");
        stdList.add(std1);
        stdList.add(std2);
        stdList.add(std3);
        int maxAge = StdUtil.getMaxAge(stdList);
        System.out.println(maxAge);
    }
}
